<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="com.entity.Document" %>
<!DOCTYPE HTML>
<html >
<head>
	<meta charset="UTF-8">
	<title>凯胜项目管理系统</title>
	<link rel="stylesheet" href="css/bootstrap.min.css" />
	<style type="text/css">
		.icon-while{
			background-image: url("img/glyphicons-halflings-white.png");
		}
	</style>
</head>
<body>
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a href="#" class="brand">凯胜项目管理系统</a>
				<form class="navbar-search pull-right">
					<input style="border-radius:20px" type="text" class="search-query" placeholder="Search">
				</form>
			</div>
		</div>
	</div>
	<br />
	<br />
	<br />
	<br />
	<div class="container">
		<div class="row">
			<div class="span3">
				<div style="padding:8px 0;" class="well">
					<ul class="nav nav-list">
						<li class="nav-header">新Apple总部项目</li>
						<li class="divider">&nbsp;</li>
						<li><a href="#"><i class=" icon-home"></i>最新动态</a></li> 
						<li><a href="goal.html"><i class="icon-flag"></i>目标</a></li>
						<li class="active"><a href="document.html"><i class="icon-folder-open icon-while"></i>资料库</a></li>
						<li><a href="file.html"><i class="icon-file"></i>文件共享</a></li>
						<li><a href="contact.html"><i class="icon-user"></i>联系人</a></li>
						<li><a href="idea.html"><i class="icon-fire"></i>想法</a></li>
						<li><a href="#"><i class="icon-warning-sign"></i>Bug</a></li>
						<li><a href="#"><i class="icon-cog"></i>项目设置</a></li>
					</ul>
				</div>
			</div>
			<div class="span9">
				<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
					<li class="active">
						<a href="#"><i class="icon-folder-open"></i>资料</a>
					</li>
					<li class="pull-right"><i class="icon-plus"></i><a href="document.jspx?m=share" class="link-black">分享新资料</a></li>
				</ul>
				<div class="wall" style="margin-bottom:20px;">
					<c:forEach items="${page.result}" var="p">
					<blockquote>
						<h4><a href="document.jspx?m=show">${p.docname() }</a></h4>
						<p style="font-size:14px;line-height:1.5;">${p.docmessage()}</p>
						<small>${p.user.username }发布于${p.time}</small>
						<c:choose>

							<c:when test="${p.user.userid eq up.userid}">
								<a href="editdocument.jspx>m=edit" title="修改"><i class="icon-pencil"></i></a>
								<a href="document.jspx?m=del" title="删除"><i class="icon-trash"></i></a>
							</c:when>
							<c:when test="${up.role eq 'admin'}">
							</c:when>
							<c:otherwise></c:otherwise>
						</c:choose>
							<form action="document.jspx?m=share" method="post">
									<input name="msg" type="text" rows="20px" class="span6"/>
									</form>
									<input type="hidden" name="up"/ >
					</blockquote>
					</c:forEach>
					
				
					<div class="pagination pull-right">
				  		共${page.totalPages }页当前第${page.pageNum }页
						  	<c:choose>
					  		<c:when test="${page.pageNum == 1 }">
					  			首页
					  		</c:when>
					  		<c:otherwise>
							  	<a href="prod.jspx?p=1">首页</a>
					  		</c:otherwise>
					  	</c:choose>
					  	<c:choose>
					  		<c:when test="${page.pageNum == 1 }">
					  			上一页
					  		</c:when>
					  		<c:otherwise>
							  	<a href="prod.jspx?p=${page.pageNum - 1 }">上一页</a>
					  		</c:otherwise>
					  	</c:choose>
					  	<c:choose>
					  		<c:when test="${page.pageNum == page.totalPages }">
					  			下一页
					  		</c:when>
					  		<c:otherwise>
							  	<a href="prod.jspx?p=${page.pageNum + 1 }">下一页</a>
					  		</c:otherwise>
					  	</c:choose>
					  	<c:choose>
					  		<c:when test="${page.pageNum == page.totalPages }">
					  			尾页
					  		</c:when>
					  		<c:otherwise>
							  	<a href="prod.jspx?p=${page.totalPages}">尾页</a>
					  		</c:otherwise>
					  	</c:choose>
							</div>
					<div class="clear"></div>
				</div>
			</div>
		</div>
		
	</div>
</body>
</html>